<template>
   <el-carousel trigger="click" height="auto" ref="banner">
      <el-carousel-item v-for="item in bannerData" :key="item.id">
        <el-image :src="item.banner_url" width="100%"></el-image>
      </el-carousel-item>
    </el-carousel>
  </template>
  ​
  <script setup>
  import { defineProps, ref,onMounted  } from 'vue'
  const banner = ref()
  const props = defineProps({
    bannerData: Array
  })
  onMounted(() => {
    setTimeout(() => {
      banner.value.setActiveItem(0)
    }, 100)
  })
  </script>
  ​
  <style scoped>
  .el-image{
    width: 100%;
  }
  .el-carousel__item{
    width: 100vw;
    height: calc(5600vw/128);
  }
  </style> 